--- warewulf-vnfs-3.6/libexec/wwmkchroot/functions	2014-05-21 11:13:14.000000000 -0700
+++ warewulf-vnfs-3.6.patch/libexec/wwmkchroot/functions	2014-10-22 10:41:33.926759500 -0700
@@ -91,7 +91,11 @@
 }
 
 configure_authentication() {
-    /usr/sbin/chroot $CHROOTDIR /usr/sbin/pwconv
+    if [ -x "/usr/sbin/chroot" ]; then
+        /usr/sbin/chroot $CHROOTDIR /usr/sbin/pwconv
+    elif [ -x "/usr/bin/chroot" ]; then
+    	/usr/bin/chroot $CHROOTDIR /usr/sbin/pwconv
+    fi
     return 0
 }
 
@@ -156,7 +160,9 @@
 }
 
 configure_network() {
-    if [ -d $CHROOTDIR/etc/sysconfig ]; then
+    if [ -d $CHROOTDIR/etc/sysconfig/network ]; then
+        return 0
+    elif [ -d $CHROOTDIR/etc/sysconfig ]; then
         echo "NETWORKING=yes" > $CHROOTDIR/etc/sysconfig/network
     fi
     return 0
--- warewulf-vnfs-3.6/libexec/wwmkchroot/golden-system.tmpl	2014-05-21 11:13:14.000000000 -0700
+++ warewulf-vnfs-3.6.patch/libexec/wwmkchroot/golden-system.tmpl	2014-10-22 10:41:33.938261800 -0700
@@ -36,6 +36,7 @@
         --exclude=/var/tmp/* \
         --exclude=/var/log/* \
         --exclude=/var/run/* \
+        --exclude=/var/lib/ntp/* \
         root@$SOURCEADDR:/ .
 
     if [ $? -ne 0 ]; then
--- /dev/null	2014-10-22 10:55:20.000000000 -0700
+++ warewulf-vnfs-3.6.patch/libexec/wwmkchroot/opensuse-13.tmpl	2014-10-22 10:41:33.947263600 -0700
@@ -0,0 +1,22 @@
+#DESC: A clone of Red Hat Enterprise Linux 6
+
+# The general RHEL include has all of the necessary functions, but requires
+# some basic variables specific to each chroot type to be defined.
+. include-suse
+
+
+
+# Define the location of the YUM repository
+ZYP_MIRROR="http://download.opensuse.org/update/13.1/x86_64/"
+
+# Install only what is necessary/specific for this distribution
+PKGLIST="sysvinit aaa_base bash openSUSE-release coreutils e2fsprogs ethtool \
+    filesystem findutils gawk grep iproute2 iputils mingetty net-tools \
+    nfs-kernel-server pam rpcbind procps psmisc rdate rsync sed shadow rsyslog tcpd \
+    timezone util-linux words libz1 tar less gzip which module-init-tools \
+    udev openssh dhcp-client pciutils vim strace cronie cpufrequtils cpio wget"
+
+
+
+
+# vim:filetype=sh:syntax=sh:expandtab:ts=4:sw=4:
--- /dev/null	2014-10-22 10:56:15.000000000 -0700
+++ warewulf-vnfs-3.6.patch/libexec/wwmkchroot/include-suse	2014-10-22 10:41:33.956765500 -0700
@@ -0,0 +1,116 @@
+
+
+REPO_NAME="SUSE-Linux-Enterprise-Server-11-SP3"
+ZYP_CONF="/root/zypp-ww.conf"
+ZYP_CMD="zypper -c $CHROOTDIR/$ZYP_CONF --root $CHROOTDIR -n --gpg-auto-import-keys"
+
+sanity_check() {
+    if [ ! -x $WAREWULF_PREFIX/bin/cluster-env ]; then
+        echo "warewulf-cluster package is recommended on nodes you are building VNFS images on.";
+        sleep 2;
+    else
+        $WAREWULF_PREFIX/bin/cluster-env;
+    fi
+
+    if ! rpm -q zypper >/dev/null 2>&1; then
+        echo "ERROR: Could not query RPM for Zypper"
+        return 1
+    fi
+    return 0
+}
+
+prechroot() {
+
+    if [ -n "$OS_MIRROR" ]; then
+        ZYP_MIRROR="$OS_MIRROR"
+    fi
+
+    if [[ -z "$ZYP_MIRROR" && -z "$INSTALL_ISO" ]]; then
+        echo "ERROR: You must define the \$ZYP_MIRROR variable in the template"
+        cleanup
+        exit 1
+    fi
+
+    VERSION=`rpm -qf /etc/SuSE-release  --qf '%{VERSION}\n'`
+
+    mkdir -p $CHROOTDIR
+    mkdir -p $CHROOTDIR/etc
+    mkdir -p $CHROOTDIR/etc/zypp
+    mkdir -p $CHROOTDIR/dev
+
+    cp -rap /etc/zypp/zypper.conf /etc/zypp/repos.d $CHROOTDIR/etc/zypp/.
+    sed -i -e "s/\$releasever/$VERSION/g" `find $CHROOTDIR/etc/zypp* -type f`
+
+    ZYP_CONF_DIRNAME=`dirname $ZYP_CONF`
+    mkdir -m 0755 -p $CHROOTDIR/$ZYP_CONF_DIRNAME
+
+    > $CHROOTDIR/$ZYP_CONF
+
+    echo "[main]" >> $CHROOTDIR/$ZYP_CONF
+    echo '#cachedir=/var/cache/yum/$basearch/$releasever' >> $CHROOTDIR/$ZYP_CONF
+    echo "#keepcache=0" >> $CHROOTDIR/$ZYP_CONF
+    echo "#debuglevel=2" >> $CHROOTDIR/$ZYP_CONF
+    echo "#logfile=/var/log/yum.log" >> $CHROOTDIR/$ZYP_CONF
+    echo "#exactarch=1" >> $CHROOTDIR/$ZYP_CONF
+    echo "#obsoletes=1" >> $CHROOTDIR/$ZYP_CONF
+    echo "#gpgcheck=0" >> $CHROOTDIR/$ZYP_CONF
+    echo "#plugins=1" >> $CHROOTDIR/$ZYP_CONF
+    echo "#reposdir=0" >> $CHROOTDIR/$ZYP_CONF
+    echo "" >> $CHROOTDIR/$ZYP_CONF
+
+    cp -RLp /dev/zero $CHROOTSDIR/.
+
+    if [ -z "$INSTALL_ISO" ]; then
+        echo "[$REPO_NAME]" >> $CHROOTDIR/$ZYP_CONF
+        echo 'name=Linux $releasever - $basearch' >> $CHROOTDIR/$ZYP_CONF
+        echo "baseurl=$ZYP_MIRROR" >> $CHROOTDIR/$ZYP_CONF
+        echo "enabled=1" >> $CHROOTDIR/$ZYP_CONF
+        echo "type=rpm-md" >> $CHROOTDIR/$ZYP_CONF
+    else
+        for i in `ls -d $MEDIA_MOUNTPATH.*`; do
+            if [ -z "$INSTALLDIRS" ]; then
+                if [ -d $i/repodata ]; then
+                    # RHEL 6.x
+                    INSTALLDIRS="file://$i"
+                elif [ -d $i/Server/repodata ]; then
+                    # RHEL 5.x
+                    INSTALLDIRS="file://$i/Server"
+                fi
+            else
+                INSTALLDIRS="$INSTALLDIRS,file://$i"
+            fi
+        done
+        echo "[$REPO_NAME]" >> $CHROOTDIR/$ZYP_CONF
+        echo 'name=Linux $releasever - $basearch' >> $CHROOTDIR/$ZYP_CONF
+        echo "baseurl=$INSTALLDIRS" >> $CHROOTDIR/$ZYP_CONF
+        echo "enabled=1" >> $CHROOTDIR/$ZYP_CONF
+        echo "type=rpm-md" >> $CHROOTDIR/$ZYP_CONF
+
+        ZYP_MIRROR=$INSTALLDIRS
+    fi
+
+}
+
+buildchroot() {
+
+    if [ -z "$PKGLIST" ]; then
+        echo "ERROR: You must define the \$PKGLIST variable in the template!"
+        cleanup
+        exit 1
+    fi
+
+    $ZYP_CMD install -l -n $PKGLIST
+
+    if [ $? -ne 0 ]; then
+        echo "ERROR: Failed to create chroot"
+        return 1
+    fi
+
+    return 0
+}
+
+postchroot() {
+    touch $CHROOTDIR/fastboot
+    return 0
+}
+
--- /dev/null	2014-10-22 10:57:03.000000000 -0700
+++ warewulf-vnfs-3.6.patch/libexec/wwmkchroot/sles-11.tmpl	2014-10-22 10:41:33.985771300 -0700
@@ -0,0 +1,22 @@
+#DESC: SUSE Linux Enterprise 11SP3
+
+# The general SUSE include has all of the necessary functions, but requires
+# some basic variables specific to each chroot type to be defined.
+. include-suse
+
+
+
+# Define the location of the Zypper repository
+ZYP_MIRROR="SUSE-url"
+
+# Install only what is necessary/specific for this distribution
+PKGLIST="sysvinit aaa_base bash sles-release coreutils e2fsprogs ethtool \
+    filesystem findutils gawk grep iproute2 iputils mingetty net-tools \
+    nfs-kernel-server pam rpcbind procps psmisc pwdutils rsync sed rsyslog tcpd \
+    timezone util-linux words zlib tar less gzip module-init-tools \
+    udev openssh dhcp-client pciutils vim strace cron cpufrequtils cpio wget zypper libstdc++6 libgcc_s1"
+
+
+
+
+# vim:filetype=sh:syntax=sh:expandtab:ts=4:sw=4:
--- /dev/null	2014-10-22 10:57:27.000000000 -0700
+++ warewulf-vnfs-3.6.patch/libexec/wwmkchroot/sles-12.tmpl	2014-10-22 10:46:22.032869200 -0700
@@ -0,0 +1,22 @@
+#DESC: SUSE Linux Enterprise 12
+
+# The general SUSE include has all of the necessary functions, but requires
+# some basic variables specific to each chroot type to be defined.
+. include-suse
+
+
+
+# Define the location of the Zypper repository
+ZYP_MIRROR="SUSE-url"
+
+# Install only what is necessary/specific for this distribution
+PKGLIST="systemd-sysvinit aaa_base bash dracut sles-release coreutils e2fsprogs ethtool \
+    filesystem findutils gawk grep iproute2 iputils mingetty net-tools \
+    nfs-kernel-server pam rpcbind procps psmisc shadow rsync sed rsyslog tcpd \
+    timezone util-linux words libz1 tar less gzip kmod-compat udev openssh \
+    dhcp-client pciutils vim strace cron cpupower cpio wget zypper libstdc++6 libgcc_s1 libicu52_1"
+
+
+
+
+# vim:filetype=sh:syntax=sh:expandtab:ts=4:sw=4:
--- warewulf-vnfs-3.6/libexec/wwmkchroot/Makefile.am	2014-05-21 11:13:14.000000000 -0700
+++ warewulf-vnfs-3.6.patch/libexec/wwmkchroot/Makefile.am	2014-10-22 10:46:50.526566800 -0700
@@ -1,6 +1,6 @@
 wwmkchrootdir = $(libexecdir)/warewulf/wwmkchroot
 
-dist_wwmkchroot_SCRIPTS = centos-5.tmpl centos-6.tmpl include-rhel rhel-generic.tmpl sl-5.tmpl sl-6.tmpl functions include-deb debian.tmpl debian7-32.tmpl debian7-64.tmpl golden-system.tmpl
+dist_wwmkchroot_SCRIPTS = centos-5.tmpl centos-6.tmpl include-rhel rhel-generic.tmpl sl-5.tmpl sl-6.tmpl functions include-deb debian.tmpl debian7-32.tmpl debian7-64.tmpl golden-system.tmpl include-suse opensuse-13.tmpl sles-11.tmpl sles-12.tmpl
 
 MAINTAINERCLEANFILES = Makefile.in
 
--- warewulf-vnfs-3.6/libexec/wwmkchroot/Makefile.in	2014-05-28 11:05:16.000000000 -0700
+++ warewulf-vnfs-3.6.patch/libexec/wwmkchroot/Makefile.in	2014-10-22 10:47:13.334127400 -0700
@@ -143,7 +143,7 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 wwmkchrootdir = $(libexecdir)/warewulf/wwmkchroot
-dist_wwmkchroot_SCRIPTS = centos-5.tmpl centos-6.tmpl include-rhel rhel-generic.tmpl sl-5.tmpl sl-6.tmpl functions include-deb debian.tmpl debian7-32.tmpl debian7-64.tmpl golden-system.tmpl
+dist_wwmkchroot_SCRIPTS = centos-5.tmpl centos-6.tmpl include-rhel rhel-generic.tmpl sl-5.tmpl sl-6.tmpl functions include-deb debian.tmpl debian7-32.tmpl debian7-64.tmpl golden-system.tmpl include-suse opensuse-13.tmpl sles-11.tmpl sles-12.tmpl
 MAINTAINERCLEANFILES = Makefile.in
 all: all-am
 
--- warewulf-vnfs-3.6/bin/wwbootstrap     2015-11-02 13:53:51.337557568 -0800
+++ warewulf-vnfs-3.6.patch/bin/wwbootstrap 2015-11-02 13:54:51.684878692 -0800
@@ -232,6 +232,11 @@

     }

+    # manually copy modules.order and modules.builtin from chroot to
+    # suppress warning from depmod
+    copy("$opt_chroot/lib/modules/$opt_kversion/modules.order", "$tmpdir/initramfs/lib/modules/$opt_kversion/modules.order");
+    copy("$opt_chroot/lib/modules/$opt_kversion/modules.builtin", "$tmpdir/initramfs/lib/modules/$opt_kversion/modules.builtin");
+
     if ($module_count > 0) {
         &nprint("Number of drivers included in bootstrap: $module_count\n");
         &dprint("Running depmod\n");
--- /dev/null	2014-11-04 13:58:13.352043839 -0500
+++ warewulf-vnfs-3.6.patch/libexec/wwmkchroot/centos-7.tmpl	2014-11-04 17:56:31.879873659 -0500
@@ -0,0 +1,24 @@
+#DESC: A clone of Red Hat Enterprise Linux 7
+
+# The general RHEL include has all of the necessary functions, but requires
+# some basic variables specific to each chroot type to be defined.
+. include-rhel
+
+
+
+# Define the location of the YUM repository
+YUM_MIRROR="http://mirror.centos.org/centos-7/7/os/\$basearch/"
+
+# Install only what is necessary/specific for this distribution
+PKGLIST="SysVinit basesystem bash redhat-release chkconfig coreutils e2fsprogs \
+    ethtool filesystem findutils gawk grep initscripts iproute iputils \
+    mingetty mktemp net-tools nfs-utils pam portmap procps psmisc rdate rsync \
+    sed setup shadow-utils rsyslog tcp_wrappers tzdata util-linux words zlib \
+    tar less gzip which util-linux module-init-tools udev openssh-clients \
+    openssh-server dhclient pciutils vim-minimal shadow-utils strace cronie \
+    crontabs cpuspeed cpufrequtils cpio wget yum numactl"
+
+
+
+
+# vim:filetype=sh:syntax=sh:expandtab:ts=4:sw=4:
